home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Varsity Update 1998 August
/
SGI Varsity Update 1998 August.iso
/
docs6.4
/
relnotes
/
c_fe
/
ch6.z
/
ch6
Wrap
Text File
|
1998-07-29
|
14KB
|
594 lines
- 1 -
7.2.1 ANSI C Front-End Release Notes
- 2 -
DDDDooooccccuuuummmmeeeennnntttt NNNNuuuummmmbbbbeeeerrrr 000000007777----1111666655559999----000011110000
6. _B_u_g__F_i_x_e_s
This chapter details bugs that have been fixed
both for 7.2.1 and 7.2.
6.1 _B_u_g__F_i_x_e_s__i_n__M_I_P_S_p_r_o__7_._2_._1
This section briefly describes the bugs that
have been fixed in the compiler since release
7.1. Some of the headings are followed by a
Silicon Graphics incident report number.
+o The IRIX sendmail program would produce
incorrect results when compiled -O2. This
has been fixed. (Bug 524374).
+o Incorrect expression evaluation of unsigned
subtraction
The following program produces incorrect
results for the first comparison when
compiled -n32, and -64 with 7.2. -32
compiles are OK.
- 3 -
%cat JJ.c
typedef unsigned long fakelong;
#define SUBTRACT(p,q) ((fakelong)(p) - (fakelong)(q))
main() {
char *a = "a";
char *b = "b";
char *c = "c";
/* the following comparison will compare a very large number and
a small number. */
if ((SUBTRACT(a,b)) <= (SUBTRACT(c,b))) {
printf("You have incorrectly evaluated this expression.0);
} else {
printf("You have correctly evaluated this expression.0);
}
printf("a is 0x%x 0, (fakelong)(a));
printf("b is 0x%x 0, (fakelong)(b));
printf("c is 0x%x 0, (fakelong)(c));
printf("diff a-b is 0x%x 0, (SUBTRACT(a,b)));
printf("diff c-b is 0x%x 0, (SUBTRACT(c,b)));
if ( ( (unsigned) 0 - (unsigned) 8 ) <= ((unsigned) 16 - (unsigned) 8) ) {
printf("You have incorrectly evaluated this expression.0);
} else {
printf("You have correctly evaluated this expression.0);
}
}
This has been fixed (Bug 536075).
+o Limit on number of files which could be
compiled from one cc command line when
floating licenses were used
The C compiler would stop and issue the
following warnings when trying to compile
more files than the open file descriptor
limit on a single command line under
floating licensing.
- 4 -
For Example:
(Floating Licenses being used)
%limit descriptors
descriptors 200
%cc *.c (more than 200 .c files in current directory)
file196.c:
cc: Error: can't create output file: /tmp/ctmpa001YG
: Too many open files
This has been fixed (Bug 556876).
6.2 _B_u_g__F_i_x_e_s__i_n__M_I_P_S_p_r_o__7_._2
This section briefly describes the bugs that
have been fixed in the compiler since release
7.1. Some of the headings are followed by a
Silicon Graphics incident report number.
+o The following line of code was incorrectly
being compiled under -n32 with MIPSpro 7.1
return ( ! !((!(error) || (*(error) == (1)))) )
This has been fixed (Bug 449456)
+o Under certain circumstances the C compiler
would dump core with the following message:
Signal: Segmentation fault in Scope Setup phase.
Error: Signal Segmentation fault in phase Scope Setup -- processing
aborted
cc ERROR: /usr/lib32/cmplrs/fec died due to signal 4
cc ERROR: core dumped
This has been fixed (Bug 470114)
+o Incorrect code produced under optimization
(-O2 or higher).
The compiler incorrectly optimized the
following code: (A workaround was provided
under the #ifdef OPT_BUG)
- 5 -
for (args = result; num_args1 != 0; num_args1--)
*args++ = *args1++;
#ifdef OPT_BUG /* Workaround of compiler 7.1 bug */
while (num_args2-- > 0)
#else
for ( ; num_args2 != 0; num_args2--)
#endif
*args++ = *args2++;
return result
This bug has been fixed. (Bug #428276)
+o Incorrect optimization under -O3.
The following code would produce incorrect
results when compiled under -O3:
/* test1.c */
#include <stdio.h>
main()
{
char str[] = "1.2345";
char *cp = str;
char *cpe = NULL;
printf ("1. scp = %s, cp = %x0, cp, (unsigned int) cp);
while (cp != cpe)
{
if (*cp++ == '.') break;
}
printf ("2. scp = %s, cp = %x0, cp, (unsigned int) cp);
}
This has been fixed. (Bug #447872)
+o Incorrect optimization under -O3.
The following code would produce incorrect
results when compiled under -O3:
- 6 -
/* test1.c */
#include <stdio.h>
main()
{
char str[] = "1.2345";
char *cp = str;
char *cpe = NULL;
printf ("1. scp = %s, cp = %x0, cp, (unsigned int) cp);
while (cp != cpe)
{
if (*cp++ == '.') break;
}
printf ("2. scp = %s, cp = %x0, cp, (unsigned int) cp);
}
This has been fixed. (Bug #447872)
+o Improper handling of __return_address
The following code gets incorrectly
compiled -n32 because the reference to
__return_address causes the return address
from buggy to be retrieved with incorrect
sign extension.
void buggy() { bar(__return_address); }
This has been fixed. (Bug #460589)
+o INTERNAL ERROR when compiling C code with
#pragma numthreads.
The following example illustrates an
INTERNAL ERROR in /usr/lib32/cmplrs/be:
- 7 -
%cc -mp -O3 -xansi -64 -mips4 -TENV:X=1 -OPT:alias=restrict -c file.c
### Compiler Error in file irvcc2.c during MP Lowering phase:
### out of context pragma (NUMTHREADS) in MP processing
cc INTERNAL ERROR: /usr/lib32/cmplrs/be returned non-zero status 1
%cat file.c
void
fored (int *rmatbeg, int *rmatind, double *rmatval, int *rmatend,
int rows, int cols, double *y, double *x, int maxthreads)
{
int i, j, j1, k, l;
double temp;
if ( mpc_in_parallel_region() ) maxthreads = 1;
#pragma parallel
#pragma numthreads (min=1;max=maxthreads)
#pragma shared (rmatbeg, rmatend, rmatind, rmatval, y, x, rows)
#pragma local (i, k, l, temp)
{
#pragma pfor iterate(i=0;rows;1) schedtype(gss)
for (i = 0; i < rows; i++) {
temp = 0.0;
l = rmatend[i];
#pragma ivdep
for (k = rmatbeg[i]; k < l; k++) {
temp += rmatval[k]*x[rmatind[k]];
}
y[i] = temp;
} /* End for loop */
} /* End parallel section */
}
This has been fixed. (Bug #461670)
+o Incorrect promotion of formal arguments.
The following code would produce incorrect
results when compiled -64.
- 8 -
#include <stdio.h>
int R_DIEDRE(xa,ya,za,xb,yb,zb,xc,yc,zc,xd,yd,zd)
float xa,ya,za;/* coord. du 1er atome */
float xb,yb,zb;/* coord. du 2eme atome */
float xc,yc,zc;/* coord. du 3eme atome */
float xd,yd,zd;/* coord. du 4eme atome */
{
printf("%f %f %f %f %f %f %f %f %f %f %f
%f0,xa,ya,za,xb,yb,zb,xc,yc,zc,xd,yd,zd);
return(0);
}
main()
{
float X[40],Y[40],Z[40],ang;
R_DIEDRE(123.4,123.4,123.4,
123.4,123.4,123.4,
123.4,123.4,123.4,
123.4,123.4,123.4);
}
This has been fixed (Bug #465609).
+o Incorrect sign extension induced by
optimizer
Under certain circumstances the optimizer
would produce code with values incorrectly
sign extended. This has been fixed (Bugs
#467930 and #468670).
+o Assertion failure in compiler back-end.
The following code would cause the
compilation to fail for -n32 compiles:
- 9 -
typedef struct bar {
unsigned long size;
unsigned long space;
} bar;
typedef struct foo {
bar dict;
} foo;
#define size(d) ((d)->size-(d)->space)
void spam (foo *baz)
{
int flag = 1;
flag &= (size(&baz->dict) <= 4294967295U);
}
This has been fixed (Bug #469411).
+o cc generates bad code when assigning to a
variable in expression
Under certain circumstances cc would
generate bad code when assigning to a
variable in an expression. This has been
fixed (Bug 462177).